package com.cloud.api.myenum;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;

public enum OrderStatusEnum implements IEnum<Integer> {
    WAIT_PAY(0,"待支付"),
    WAIT_SHIP(1,"商家待发货"),
    WAIT_DELIVER(2,"待收货"),
    FINISHED(3,"已完成"),
    CANCELLED(4,"已取消");

    OrderStatusEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private Integer value;
    @EnumValue
    @JsonValue
    private String desc;

    @Override
    public Integer getValue() {
        return this.value;
    }
}
